import 'package:flutter/services.dart';

class TabBarController {
  // 定义一个MethodChannel
  static final channel = const MethodChannel("tab_switch");

  /// 显示tabbar
  static Future<int> showTab() async {
    final result = await channel.invokeMethod("showTab");
    return result ?? 0;
  }

  /// 隐藏tabbar
  static Future<int> hideTab() async {
    final result = await channel.invokeMethod("hideTab");
    return result ?? 0;
  }
}